<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>嘉童游乐中心-商品定价清单</title>
<jsp:include page="/common/commonCss.jsp"/>
<jsp:include page="/common/commonJs.jsp"/>
<script type="text/javascript">
		function resubmitApply(id){
			$("#status").val(id);
			$.messager.confirm('温馨提示', '您确定要提交吗?', function(flag) { 
				if (flag) {
					$("#hide_loading").show();
					$.ajax({
						url:"${basePath}scmInvocing/priceManager/handResubmitForBranch.shtml",
						dataType:"json",
						type:"post",
						async:false,
						data:$("#resubmitFor").serialize(),
						error : function(XMLHttpRequest) {
				 				ajaxError(XMLHttpRequest);
				 		},
						success:function(result){
							 if(result=="1"){
								 $("#hide_loading").hide();
				 				 window.location.href="${basePath}scmInvocing/priceManager/forwardToList.shtml";
							 }
						}
					});
				}
			});
			
 		}
</script>
</head>
<body class="bg">
<div class="content m_auto">
 <div class="content_l mt10">
    	<ul>
    		<shiro:hasPermission name="scmInvocing/productInfo/forwardToProductInfo.shtml">
    				  <li><a href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml"><i class="nav_icon_b"></i><br>商品信息</a></li>
    		</shiro:hasPermission>
    		 <shiro:hasPermission name="scmInvocing/countUnit/forwardToUnitInfo.shtml">
    		 		<li><a href="${basePath}scmInvocing/countUnit/forwardToUnitInfo.shtml"><i class="nav_icon_b"></i><br>单位设置</a></li>
    		 </shiro:hasPermission>
    		 <shiro:hasPermission name="scmInvocing/supplier/forwardToSupply.shtml">
    		 		   <li><a href="${basePath}scmInvocing/supplier/forwardToSupply.shtml"><i class="nav_icon_a"></i><br>供应商信息</a></li>
    		 </shiro:hasPermission>
    		  <shiro:hasPermission name="scmInvocing/priceManager/forwardToList.shtml">
    		 		  <li class="content_hover"><a href="${basePath}scmInvocing/priceManager/forwardToList.shtml"><i class="nav_icon_f"></i><br>价格管理</a></li>
    		 </shiro:hasPermission>
    		   <shiro:hasPermission name="scmInvocing/scmPurOrder/findInvoPurOrder.shtml">
            	  <li><a href="${basePath}scmInvocing/scmPurOrder/findInvoPurOrder.shtml"><i class="nav_icon_b"></i><br>采购订单</a></li>
    		 </shiro:hasPermission>
    		   <shiro:hasPermission name="scmInvocing/scmPayForm/findInvoOrderPay.shtml">
           		   <li><a href="${basePath}scmInvocing/scmPayForm/findInvoOrderPay.shtml"><i class="nav_icon_b"></i><br>付款申请</a></li>
    		 </shiro:hasPermission>
   </ul>
    </div>
    <div class="content_r mt10">
    	<div class="p20">
    	<div class="file_single_dl f14 fixed">
    	<form action="${basePath}scmInvocing/priceManager/handResubmitForBranch.shtml" id="resubmitFor">
    		<input type="hidden" name="fkFlowinstId" id="fkFlowinstId"  value="${fkFlowinstId}">
             <input type="hidden" name="status" id="status"  value="">
            <input type="hidden" name="pkPriceId" id="pkPriceId"  value="${entity.pkPriceId}">
             <dl class="fixed"  >
                <dd ><label><h1>商品定价清单</h1></label></dd>
            </dl>
             <dl class="fixed"  >
                <dd><label>定价人：</label>${entity.userName}</dd> <dd ><label>定价日期：</label>2014-11-10</dd>
                <dd><label>定价单位：</label>${entity.branName}</dd>
            </dl>
       		 <dl class="fixed"  >
                <dd ><label>商品编号：</label> <input type="text" class="iput_t w200" value="${entity.fkPrdId}" disabled>  </dd> 
                <dd ><label>商品名称：</label> <input type="text" class="iput_t w200" value="${entity.prdName}" disabled>  </dd>
            </dl>
      		 <dl class="fixed"  >
                <dd ><label> 计量单位：</label> <input type="text" class="iput_t w200" value="${entity.unitName}" disabled>  </dd> 
                <dd ><label>商品规格：</label> <input type="text" class="iput_t w200" value="${entity.prdSpec}" disabled>  </dd>
            </dl>
               <dl class="fixed"  >
                <dd ><label> 商品分类：</label> <input type="text" class="iput_t w200" value="${entity.cateName}" disabled>  </dd> 
                <dd ><label>市场销售价：</label> <input type="text" class="iput_t w200" value="${entity.marketPrice}" disabled>  </dd>
            </dl>
              <dl class="fixed"  >
                <dd ><label> 允许分店定价：</label>
                			<c:choose>
                					<c:when test="${entity.isAllow=='1'}">
                							<input type="text" disabled="disabled"  class="iput_t w200" value="是"/>
                					</c:when>
                					<c:otherwise>
                							<input type="text" disabled="disabled"  class="iput_t w200" value="否"/>
                								
                					</c:otherwise>
                			</c:choose>
                </dd>
                         <div id="fendianP" style="display:block"><dd ><label>分店价格：</label>
                          <input type="text" class="iput_t w200"  name="branchPrice"  value="${entity.branchPrice}"  >  
                          </dd></div>
               
            </dl>
            <dl class="fixed"   >
             <dd ><label>总部价格：</label> <input type="text" class="iput_t w200" value="${entity.headPrice}"   disabled="disabled" >  </dd>
            </dl>
             <dl class="fixed"   >
             
              <dd><label>备注：</label><textarea class="textare w200"  name="comments">${entity.comments}</textarea></dd>
            </dl>
           </form>
        </div>
            <div>
            <dl class="fixed order_dl">
							<dd><label><b>处理历史：</b></label>
                        	</dd><dd>
                            <table class="table">
                                <tbody><tr>
                                    <th>时间</th>
                                    <th>处理人</th>
                                    <th>结果</th>
                                    <th>处理意见</th>
                                </tr>
                                  <!-- 处理历史 -->
                                <c:forEach items="${entity.workflowVo.optHisVoList}" var="his">
                                				<tr>
														<td style="width: 40%">${his.optTime }</td>
														<td>${his.optName }</td>
														<td>${his.result }</td>
														<td title="${his.advice}">
														<c:if test="${his.advice != null}">
															<c:choose>
																<c:when test="${his.advice.length() > 5}">
																	${his.advice.substring(0,5)}...
																</c:when>
																<c:otherwise>
																	${his.advice}
																</c:otherwise>
															</c:choose>
														</c:if>
														</td>
												</tr>
                                </c:forEach>
                            </tbody></table>
                        </dd>
            	</dl>
            </div>
            <!----底部按钮----->
            <div class="btm_btn mt10">
                    <dl>
                        <!-- <dd><input class="btn" type="button" value="保存" onClick="resubmitApply('1');"></dd> -->
                        <dd><input class="btn" type="button" value="提交" onClick="resubmitApply('2');"></dd>
                        <dd><input class="btn" type="button" value="返回" onClick="window.location.href='${basePath}scmInvocing/priceManager/forwardToList.shtml'"></dd>
                    </dl>
            </div>
            <div id="hide_loading">
					<div class="loading"></div>    
				    <div class="loading_bg" ></div>	
				</div>
            <!----底部按钮----->
        </div>
    </div>
</div>
</body>
</html>
